//在主函数中从键盘接收X, Y , Z3个数，编写函数计算这3个数的立方和并返回计算结果：S=X3+Y3+Z3

import java.util.Scanner;

public class 求3数立方和 {
    public static void main(String[] args) {
        getS();
    }

    private static void getS() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入x：");
        int x = sc.nextInt();
        System.out.println("请输入y：");
        int y = sc.nextInt();
        System.out.println("请输入z：");
        int z = sc.nextInt();
        int S = (int) (Math.pow(x, 3) + Math.pow(y, 3) + Math.pow(z, 3));
        System.out.println("结果为：" + S);

    }
}